package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;

/**
 * @author 赵星
 * @version 1.0
 * @Date 2023/9/24 13:42
 */
@Mapper
public interface UserMapper {

    @Select("select * from user where openid = #{openid}")
    User getUser(String openId);

    void insert(User user);

    @Select("select * from user where id = #{userId}")
    User getById(Long userId);

    Integer countByMap(HashMap<String, Object> map);
}
